package cn.stylefeng.guns.modular.business.custom.enums;

/**
 * 提现记录枚举
 * @Author liwenlong
 */
public enum WalletDetailEnums {
    /**
     * 佣金收益
     */
    TEAM_COMMISSION(1, "佣金收益"),

    /**
     * 提现申请扣除
     */
    WITH_DEDU(2, "提现申请扣除"),

    /**
     * 提现失败返还
     */
    WITH_FAIL_RETURN(3, "提现失败返还"),

    /**
     * 充值余额
     */
    RECHARGE_BALANCE(4, "充值余额"),

    ;

    private Integer code;
    private String name;

    public static String getName(Integer code) {
        for (WalletDetailEnums c : WalletDetailEnums.values()) {
            if (c.getCode().equals(code)) {
                return c.name;
            }
        }
        return null;
    }

    WalletDetailEnums(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
